package com.coderush.admin.sys.exception;

import com.coderush.admin.core.exception.BusinessException;

/**
 * PackageName com.coderush.admin.sys.exception
 *
 * @Author Eason
 * @Version v1.0
 * @ClassName MenuException
 * @Date 2025/8/29
 * @Description TODO
 */
public class MenuException extends BusinessException {

    public MenuException(String message) {
        super(message);
    }
    public MenuException(Integer code, String message) {
        super(code, message);
    }


    public static Exception repeatMenuCode() {
        return new RoleException(1040, "菜单编号不能重复");
    }

    public static Exception repeatMenuName() {
        return new RoleException(1041, "菜单名称不能重复");
    }

    public static Exception menuNotExist() {
        return new RoleException(1042, "菜单不存在");
    }

    public static Exception noRoleAndMenu() {
        return new RoleException(1043, "还未分配角色和菜单");
    }

    public static Exception roleIdNotExist() {
        return new RoleException(1044, "角色ID不能为空");
    }
}